<!DOCTYPE html>
<html>
<head>
<link href="resources/flexbox.css" rel="stylesheet">
<style>
</style>
<script src="../../resources/check-layout.js"></script>
</head>
<body>
<p>Test to make sure that we properly relayout when an image loads. You
should see a green 100x100 image.</p>
<div id="test" class="flexbox">
    &nbsp;
    <div class="flexbox">
        <img data-expected-width=100 data-expected-height=100 id="image" onload="imageLoaded()">
    </div>
</div>
<script>
if (window.testRunner)
    testRunner.waitUntilDone();

function changeImage()
{
    document.getElementById("image").src = "../images/resources/green-100.png";
}
setTimeout(changeImage, 0);

function imageLoaded()
{
    checkLayout('#test')
    if (window.testRunner)
        testRunner.notifyDone();
}
</script>
</body>
</html>
